# This file demonstrates how to compile the hello-world project
# on Linux. Just run "make" to compile it.

GPP=g++-4.4
GCC=gcc-4.4

OUTFILE="mygeoip.so"
GEOIP_LIB=libGeoIP
COMPILE_FLAGS=-m32 -c -O3 -fPIC -I$(GEOIP_LIB) -I../ -DGEOIPDATADIR=\"./\" -fvisibility=hidden

all:
	$(GCC) $(COMPILE_FLAGS) $(GEOIP_LIB)/*.c
	$(GPP) $(COMPILE_FLAGS) ../SDK/*.cpp
	$(GPP) $(COMPILE_FLAGS) *.cpp
	$(GPP) -m32 -fshort-wchar -shared -o $(OUTFILE) *.o
	rm *.o
